package com.cskaoyan.market.controller;

import com.cskaoyan.market.db.domain.MarketSearchHistory;
import com.cskaoyan.market.service.MarketHistoryService;
import com.cskaoyan.market.util.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
import java.util.List;

/**
 * @Author: 付诚
 * @Date: 2024/5/6 21:22
 * @Description:
 */
@RestController
@RequestMapping("/admin/history")
public class AdminHistoryController {

    @Autowired
    private MarketHistoryService marketHistory;

    @RequestMapping(value = "/list")
    private Object list(Integer page, Integer limit, String userId, String keyword, String sort, String order) throws IOException {

        List<MarketSearchHistory> marketHistoryList = marketHistory.list(page, limit, userId, keyword, sort, order);
        return ResponseUtil.okList(marketHistoryList);
    }
}
